// crowdfund/components/order/payway/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    pay_type_list: Array
  },


  data: {
    payway: false,
    way: 0
  },

  attached() {
    this.triggerEvent("wayselect", this.data.way)
  },
  methods: {
    payWay() {
      this.setData({
        payway: true
      })
    },
    hindmask() {
      this.setData({
        payway: false
      })
    },
    clickon() {

    },
    wayselect(e) {
      var name = e.currentTarget.dataset.name
      if (name == "微信支付") {
        this.setData({
          way: 0
        })

      } else if (name == "账户余额支付") {
        this.setData({
          way: 3
        })
      }
      this.triggerEvent("wayselect", this.data.way)
    }
  }
})